import { Component, OnInit, Input } from '@angular/core';

import { AppGlobalService } from 'src/app/shared/service/app-global.service';

@Component({
  selector: 'app-case-recommed-list',
  templateUrl: './case-recommed-list.component.html',
  styleUrls: ['./case-recommed-list.component.scss'],
})
export class CaseRecommedListComponent implements OnInit {
  @Input() tagData: any;
  constructor(
    private appGlobalService: AppGlobalService
  ) {

  }

  ngOnInit() {
    // this.demoData();
  }
  moreClick(link) {
    this.appGlobalService.openPage(link);
  }
  onClick(link) {
    this.appGlobalService.openPage(link);
  }
  demoData() {
    this.tagData =
    {
    data: {
      isMargin: false,
      data: [
          {
              headRowLeft: {
                  title: {
                      label: "张先生福田的餐馆15天成功转让"
                  }
              },
              secondRowLeft: {
                  firstText: {
                      label: "共为该客户推荐"
                  },
                  secondText: {
                      cssStyle: "....",
                      label: "98"
                  },
                  thirdText: {
                      label: "位选址客户"
                  }
              }
          },
          {
              headRowLeft: {
                  title: {
                      label: "张先生福田的餐馆15天成功转让"
                  }
              },
              secondRowLeft: {
                  firstText: {
                      label: "共为该客户推荐"
                  },
                  secondText: {
                      cssStyle: "....",
                      label: "98"
                  },
                  thirdText: {
                      label: "位选址客户"
                  }
              }
          },
          {
              headRowLeft: {
                  title: {
                      label: "张先生福田的餐馆15天成功转让"
                  }
              },
              secondRowLeft: {
                  firstText: {
                      label: "共为该客户推荐"
                  },
                  secondText: {
                      cssStyle: "....",
                      label: "98"
                  },
                  thirdText: {
                      label: "位选址客户"
                  }
              }
          }
      ],
      moreButton: {
          link: {
              type: "page",
              params: {
                  opportunity_id: "11111"
              },
              target: "145397"
          },
          label: "查看更多"
      },
      headDiv: {
        content: {
            firstRowRight: {
                label: "14年累计成交客户超过200万"
            },
            secondRowRight: {
                firstText: "258",
                secondText: "家"
            },
            thirdRowLeft: {
                firstText: "今日推荐客户"
            },
            firstRowLeft: {
                icon: "..../png",
                title: "铺铺旺推荐"
            },
            thirdRowRight: {
                firstText: "今日推荐成功"
            },
            secondRowLeft: {
                firstText: "1355879",
                secondText: "位"
            }
        }
    }
        }
    };
    }
}
